//
//  HFViewController.m
//  HFImageEdit
//
//  Created by liuhongfei on 08/05/2021.
//  Copyright (c) 2021 liuhongfei. All rights reserved.
//

#import "HFViewController.h"
#import <HFImageEditViewController.h>

@interface HFViewController ()

@end

@implementation HFViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    
    UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    button.backgroundColor = UIColor.orangeColor;
    [button addTarget:self action:@selector(buttonClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

- (void)buttonClick {
    UIImage *image = [UIImage imageNamed:@"home_activity"];
    
    HFImageEditViewController *editVC = [[HFImageEditViewController alloc] init];
    editVC.originImage = image;
    editVC.modalPresentationStyle = UIModalPresentationFullScreen;
    [self presentViewController:editVC animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
